package 第九周;

public class Fish extends Animal{
    private double weight;
    public Fish(int age,double weight){
        super(age);
        this.weight = weight;
    }
    public double getWeight(){
        return weight;
    }
    public void setWeight(double weight){
        this.weight = weight;
    }
    @Override
    public void info(){
        System.out.println("我是一条" + weight + "斤重的鱼！");
        super.info();
    }
}
